;;;
;;;
;;;	Author:
;;;		Henry C. Francis
;;;		425 N. Ashe St.
;;;		Southern Pines, NC 28387
;;;
;;;	http://www.paracadd.com
;;;	All rights reserved.
;;;
(defun c:vpmnr ()
  (setq curvno (getvar"cvport"))
;;;  (regapp "ACAD")
  (setq cvpss (ssget "X" (LIST (CONS 410 (GETVAR "CTAB"))(CONS 69 curvno))))
  (setq cvpent (entget (ssname cvpss 0)(list "ACAD")))
  (setq cvlname (cdr(assoc 8 cvpent)))
  (if (and
        (eq (strcat (substr cvlname 3 2)) "VI")
        (wcmatch (substr cvlname 5 2) "##")
      )
    (setq prod (substr cvlname 3 4))
    (alert "Viewport is not on a view number layer")
  )
  (princ)
)
